class ScoreException(Exception):
    def __init__(self,score):
        self.score = score
    def __str__(self):
        return "分数必须在0-150之间，你输入的分数是{}，不处于这个区间，请重新输入！！！".format(self.score)

def print_score():
    score = int(input("成绩，0~100："))
    if score < 0 or score > 150:
        raise ScoreException(score)
    if score < 60:
        print("E")
    elif score < 70:
        print("D")
    elif score < 80:
        print("C")
    elif score < 90:
        print("B")
    else:
        print("A")

while True:
    try:
        print_score()
    except ScoreException as e:
        print("....", e)